package com.bxj.wxtt;

import com.bxj.wxtt.log.LogFileName;
import com.bxj.wxtt.log.LoggerUtils;
import com.ifeng.matrix.application.AbstractEmbeddedServerApplication;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;

import javax.annotation.PostConstruct;
import java.io.IOException;

/**
 * 翻阅小说服务主程序
 */
@ComponentScan("com.bxj")
@ImportResource({"classpath:dubbo-api-application.xml", "classpath:/spring/applicationContext-ehcache.xml"})
@EnableAutoConfiguration
//@PropertySource(value={"file:${spring.config.location:/bxj/api/config/application.properties}"})

public class ApiServiceApplication extends AbstractEmbeddedServerApplication {


    Logger access_log = LoggerUtils.getLogger(LogFileName.ACCESS_LOG);
    Logger charge_log = LoggerUtils.getLogger(LogFileName.CHARGE_LOG);
    static Logger logger = LoggerFactory.getLogger(ApiServiceApplication.class);


    @PostConstruct
    public void init() {
        access_log.error("access_log");
        charge_log.info("charge_log");
    }
    public static void main(String[] args) throws IOException {
        run(ApiServiceApplication.class, args);
    }
}
